﻿using System;
using System.Threading.Tasks;

namespace BaseSyntax.ThreadTest
{
	public class TaskFacNew:ITest
	{
		public Task CreateTask(int index)
		{
			Task task = Task.Factory.StartNew(() =>
			{
				Console.WriteLine(index);
			});

			return task;
		}
		public void Test()
		{
			Task task = CreateTask(1);
			
			task.Wait();
		}
	}
}